# $Id: PKGBUILD 143778 2011-11-29 08:03:13Z ibiru $
# Maintainer: Ionut Biru <ibiru@archlinux.org>
# Contributor: György Balló <ballogy@freestart.hu>
pkgname=flickrnet
_pkgname=FlickrNet
pkgver=3.2.4310
_pkgver=93705
pkgrel=1
pkgdesc="Flickr.Net API Library"
arch=('any')
url="http://www.codeplex.com/FlickrNet"
license=('LGPL')
depends=('mono')
makedepends=('unzip')
source=($pkgname-$pkgver.zip::"http://download.codeplex.com/Project/Download/SourceControlFileDownload.ashx?ProjectName=${_pkgname}&changeSetId=$_pkgver"
        "$pkgname.pc")
md5sums=('428e25f0f9921f72e5ecb60331fde248'
         '131dd6e01f99c0533e9367b5cfda3a13')

build() {
  cd $srcdir/$_pkgname
  sed -i "s/@VERSION@/$pkgver/" $srcdir/$pkgname.pc

  xbuild  /property:Configuration=Release FlickrNet.csproj
}

package() {
  cd $srcdir/$_pkgname

  gacutil -i bin/Release/$_pkgname.dll -package $pkgname-$pkgver -root "$pkgdir/usr/lib/"
  install -Dm644 "$srcdir/$pkgname.pc" "$pkgdir/usr/lib/pkgconfig/$pkgname.pc"
}
